
package com.the9.C9Alarm;

import java.io.Serializable;

public class AlarmBean implements Serializable {
    /** alarm type*/
    private int type                            = 0;
    /** alarm name */
    private String name                         = null;

    private Long interval                       = Long.MAX_VALUE;

    /** the day which alarm occurs on */
    private int day                             = 0;
    
    /** 再响时间，以分钟为单位*/    
    private int sleepDelay;

    private Boolean enableGame; 

	public Boolean getEnableGame() {
		return enableGame;
	}

	public void setEnableGame(Boolean enableGame) {
		this.enableGame = enableGame;
	}

	/** index of alarm */
    private int index                           = 0;

    private Long time;
    
    /** alarm ring mode */
    private int ringMode                        = 0;

    private boolean enabled;// = true;

    /** alarm ring uri */
    private String uri                          = null;
    
    private boolean bVibrate                    = false;
    
    private int form ;

    public int getForm() {
		return form;
	}

	public void setForm(int form) {
		this.form = form;
	}

	/**
	 * 
	 */
    private static final long serialVersionUID  = -2518061880923546881L;

    public AlarmBean(int type, String name, Long interval, int day, int index, Long time, boolean enabled,
            int mode, String uri, int sleepDelay, boolean vibrate,Boolean enableGame,int form) {
        super();
        this.type = type;
        this.name = name;
        this.interval = interval;
        this.day = day;
        this.index = index;
        this.time = time;
        this.enabled = enabled;
        this.ringMode = mode;
        this.uri = uri;
        this.sleepDelay = sleepDelay;
        this.bVibrate = vibrate;
        this.enableGame=enableGame;
        this.form = form;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public Long getTime() {
       // Log.d("alarm", "time: " + time);
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public String getName() {
      //  Log.d("alarm", "name: " + name);
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    public int getType() {
          return type;
      }

      public void setType(int type) {
          this.type = type;
      }

    public Long getInterval() {
      //  Log.d("alarm", "interval: " + interval);
        return interval;
    }

    public void setInterval(Long interval) {
        this.interval = interval;
    }

    public int getDay() {
      //  Log.d("alarm", "day: " + day);
        return day;
    }
    
    public String getDayText( int day ) {
    	String strWeeklyMode = null;
        switch (day) {
            case Symbol.DAY_ALLDAY:
                strWeeklyMode = Symbol.STR_DAY_ALLDAY;
                break;
            
            case Symbol.DAY_WEEKDAY:
                strWeeklyMode = Symbol.STR_DAY_WEEKDAY;
                break;
                
            case Symbol.DAY_WEEKEND:
                strWeeklyMode = Symbol.STR_DAY_WEEKEND;
                break;
                
            case Symbol.DAY_ONCE:
                strWeeklyMode = Symbol.STR_DAY_ONCE;
                break;
        }
        return strWeeklyMode;
    }

    public void setDay(int day) {
        this.day = day;
    }
    
    public int getRingMode() {
      //  Log.d("alarm", "get ring: " + ringMode);
        return ringMode;
    }

    public void setRingMode(int mode) {
        this.ringMode = mode;
    }
    
    public String getUri() {
      //  Log.d("alarm", "uri: " + uri);
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }
    
    public boolean getVibrate() {
        return bVibrate;
    }

    public void setVibrate(boolean vibrate) {
        this.bVibrate = vibrate;
    }
    
    public int getSleepDelay() {
    	return sleepDelay;
    }

    public void setSleepDelay(int sleepDelay) {
    	this.sleepDelay = sleepDelay;
    }
}
